home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.3
/
Video Toaster v4.3.iso
/
3.1
/
toasterall
/
arexx_examples
/
tpaint
/
tpblast.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-05-13
|
3KB
|
103 lines
/* TP Animate Blast! */
/* © 1993 NewTek, Inc. by Arnie Cachelin */
PARSE ARG x1 y1 x2 y2 frames radius savename startframe loadname
if x1="" | x2="" | y2="" | y1="" | frames="" | savename="" then do
say "Usage: rx TPBlast x1 y1 x2 y2 frames radius savename [startframe [loadname]]"
exit
end
Address "DigiPaint" /* Tell ARexx where commands go */
if pos("DigiPaint",show(ports))=0 then do
say "Can't find ToasterPaint!"
exit
end
if startframe="" then startframe=0
'Mine' /* Set Edge transparency to 0% */
'Midc' /* Set Center transparency to 50% */
'Drci'
'Flon'
rstep=(radius/frames)+1
xstep=((x2-x1)/frames)
ystep=((y2-y1)/frames)
do i=1 to frames
if loadname ~="" then say 'Call LoadRGB('loadname||right(i+startframe,3,"0")')'
if loadname ~="" then Call LoadRGB(loadname||right((i+startframe),3,"0"))
dx=(i*xstep)%1
dy=(i*ystep)%1
r=(i*rstep)%1
x=x1+dx
y=y1+dy
'Minc'
'Mide'
'Pend' x y
'Penu' x+r y
'Midc'
'Mine'
'Pend' x y
'Penu' x+r%2 y
say x1'+'dx y1'+'dy x y r
'Shco'
'Undo'
say 'Call SaveRGB('savename||right(i+startframe,3,"0")')'
Call SaveRGB(savename||right(i+startframe,3,"0"))
end
exit
SetFile: PROCEDURE /* Select file in current requester */
arg file
dirname=GetPathName(file)
'Dnam'dirname /* Enter file path */
'Dsel' /* Hit return on directory */
'Dnam'dirname /* Enter file path */
'Dsel' /* Hit return on directory */
filename=GetFileName(file)
'Fnam'filename /* Enter File name */
'Okls' /* Hit the OK button */
return
LoadFrameStore: PROCEDURE /* Load FrameStore */
arg filename /* must have ###.fs on front! */
'Loco' /* Call file requester */
'Fnam'filename /* Enter File name */
'Okls' /* Hit the OK button */
return 0
SaveFrameStore: PROCEDURE /* Save FrameStore */
arg filename /* must have ###.fs on front! */
'Saco' /* Call file requester */
'Fnam'filename /* Enter File name */
'Okls' /* Hit the OK button */
return 0
LoadRGB: PROCEDURE /* Load IFF RGB, copy into swap buffer */
arg filename
'Lo24' /* Call file requester */
Call SetFile(filename)
return
SaveRGB: PROCEDURE /* Save IFF RGB, copy into swap buffer */
arg filename
'Sa24' /* Call file requester */
Call SetFile(filename)
return
GetFileName: procedure /* Extract file name from full file specification */
ARG fullfile
c = lastpos("/",fullfile)
if c = 0 then c = lastpos(":",fullfile)
return substr(fullfile, c + 1)
GetPathName: procedure /* Extract directory name from full file specification */
ARG fullfile
c = lastpos("/",fullfile)
if c = 0 then c = lastpos(":",fullfile)
return left(fullfile,c)